package fr.alma.domo.model;

import java.io.Serializable;

/**
 * Classe définissant une propriété 
 * d'une resource système. son intérêt
 * réside dans le fait que les lectures
 * et le modifications peuvent être monitorer
 * @author steg
 *
 */
@SuppressWarnings("serial")
public class Attribute implements Serializable{

	private String name;
	private Class<?> type;
	private Object value;
	private boolean readonly;
	private boolean fragile;
	
	public Attribute(){		
	}
	
	public Attribute(String attributeName, Class<?> type) {
		this.name=attributeName;
		this.type = type;
	}
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the type
	 */
	public Class<?> getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(Class<?> type) {
		this.type = type;
	}
	/**
	 * @return the value
	 */
	public Object getValue() {
		return value;
	}
	/**
	 * @param value the value to set
	 */
	public void setValue(Object value) {
		this.value = value;
	}

	/**
	 * @return the readonly
	 */
	public boolean isReadonly() {
		return readonly;
	}

	/**
	 * @param readonly the readonly to set
	 */
	public void setReadonly(boolean readonly) {
		this.readonly = readonly;
	}

	/**
	 * @return the fragile
	 */
	public boolean isFragile() {
		return fragile;
	}

	/**
	 * @param fragile the fragile to set
	 */
	public void setFragile(boolean fragile) {
		this.fragile = fragile;
	}
	
	
}
